﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 观测者模式_双向耦合代码
{
    class StockObserver
    {
        string name;
        Secretary s;

        public StockObserver(string name,Secretary s)
        {
            this.s = s;
            this.name = name;
        }

        public void Update()
        {
            Console.WriteLine("{0}, {1}关掉股票网站", s.SecretaryAction,name);
            Console.WriteLine();
        }
    }
}
